import java.io.File;

public class demo6 {
    public static void main(String[] args) {
        File file = new File("./test1");
        // 修改 目录名并移动
        File reName = new File("./src/test2");
        file.renameTo(reName);
    }
}
